package com.jzo2o.customer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jzo2o.customer.model.domain.AddressBook;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 地址薄 Mapper 接口
 * </p>
 *
 * @author itcast
 * @since 2023-07-06
 */
public interface AddressBookMapper extends BaseMapper<AddressBook> {

    /**
     * 根据UserId分页查询地址簿
     */
    @Select("select * from address_book where user_id = #{userId} and is_deleted = 0")
    List<AddressBook> queryList(Long userId);
}
